package com.szh.zx.jvm2.chapter04.java;

import cn.hutool.core.util.ClassUtil;

/**
 * -XX:+TraceClassLoading
 * 查看类加载器加载过程
 * @author shkstart
 * @create 10:36
 */
public class UserTest {
    public static void main(String[] args) {
        User user = new User(); //隐式加载


        try {
            Class clazz = Class.forName(ClassUtil.getClassName(User.class,false)); //显式加载
            ClassLoader.getSystemClassLoader().loadClass(ClassUtil.getClassName(User.class,false));//显式加载
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

    }
}
